<template>
  <div style="padding: 10px">
    <p>选中值返回</p>
    <d-select :options="options" v-model="selectValue" @change="change"></d-select>
    <p>选中对象返回</p>
    <d-select
      :options="options"
      v-model="selectValue"
      size="small"
      @change="change"
      returnObject></d-select>

    <p>selectValue值：{{ selectValue }}</p>
  </div>
</template>

<script setup lang="ts">
  import { ref } from 'vue'
  const options = ref([
    { label: '选项1', value: '1' },
    { label: '选项2', value: '2' },
    { label: '选项3', value: '3' }
  ])
  const selectValue = ref('')
  const change = (val: unknown) => {
    console.log('🚀 ~ change ~ val:', val)
  }
</script>

<style scoped></style>
